Forum Activity for @pch

pch
@pch
09/28/17 07:50:10AM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

@brian
@paul

Thanks for your help. I have downloaded the missing modules from my JR.net account and uploaded them to my server. There were about 43 of them.

After running the repair.php script, the site was not loading and I was still getting a 500 error.

Then I've investigated the problem and discovered that I was missing my custom skin files which were made from the Elastic skin. This custom skin was active in the database. There was only the Elastic2 folder (files) in the skin folder on the server because JR 6.1.1 is packed with Elastic2 only as its default skin.

Trying to find a solution, as I had an old jamroom-core-5.2.41 zip archive on my computer, I've uploaded the Elastic skin file taken from that JR 5.2.41 to the skin folder of my JR 6.1.1 on the server and I duplicated the Elastic folder on the server giving that duplicated folder my custom skin name found in the database (jrMycustomname). Also I have uploaded few modified files (css, tpl, images etc) of my custom skin I had on my computer.

I don't know whether it is right way of fixing my problem (please correct me it is wrong) but then the site start working, No more 500 error message. I can log into the admin area. I have even reloaded all the modules one by one from the marketplace, just to make sure that there are installed correctly in the database.

Now I've few new issues:

1) My site layout is completed messed up. I can navigate without any error but the site design is just a mess. Yes I know, it's probably because of the custom skin made from JR 5.2.41 (Elastic skin) that I've manually uploaded to the server. If someone has an idea on how to fix it, please help.

2) I am unable to update the Elastic skin in the marketplace. Its status is red and it says: Installed: 1.2.12, Available: 1.4.3. But if I hit the update button, it updates and says:. "The skin was successfully updated", when nothing changes. It remains Installed: 1.2.12, Available: 1.4.3 with the red status. Any idea on how to fix it?

3) The integrity check from the admin side never complete. It keeps on running forever no matter if I select "verify modules" and "verify skins" only or if I select all the options (repair modules, repair tables, optimize tables etc). Please, how to fix it?

4) I am trying to activate Elastic2 to see if I can use it for my custom skin. First of all, I had to reload it from the marketplace because I've noticed that its files were in the server but the skin entries were not in the database since I've restored the database from a JR 5.3 backup and JR 5.3 was prior to the Elastic2 release.

After reloading the Elastic2 from the marketplace, its entries were back to the database in many tables.

Now the problem is whenever I try to set Elastic2 as active in my system, I get a 500 error message. Then the whole website stops working (loading) . Lucky for me I made a database backup before trying to set Elastic2 as active. It was easy for me to restore my system to its previous state using the database backup and get the site back online.

Here is what the error is from the error log.

 
PHP Fatal error:  Cannot redeclare jrElastic_skin_meta() (previously declared in /home/xxxxx/public_html/xxxxx/skins/jrElastic-release-1.4.3/include.php:54) in /home/xxxxx/public_html/xxxxx/skins/jrMycustomskin/include.php on line 63


How to fix it? Please help.

Thanks a lot.
pch
@pch
09/25/17 09:31:00AM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

Many thanks for your quick replies, Brian.

You are right. I am on a VPS with another popular host. They are providing us with a great service. No complain so far. Also we are running many other things on the server beside JR. I thank you for the invitation. We will take it into consideration whenever we will need to move to another hosting provider. Thanks.

About the modules, you came to the point I was concerned about since the beginning: "Having the modules installed and active in the database without having their corresponding files on the server".

So how can I install these missing module files in the system if I can't even log into the site to use the marketplace? Can I just download them from my JR.net Account (my licenses) and upload them to the server via ftp to /public_html/xxxxx/modules ? Will it work? (I think they are probably my paid modules).

Thanks
updated by @pch: 09/25/17 09:36:48AM
pch
@pch
09/25/17 08:17:49AM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

Hi Brian,

Thanks a lot for your quick reply.

Your suggestion is the second option that @michael gave me. I deleted all tables in the existing JR 6.1.1 database and imported the SQL backup (JR 5.3 database backup). Then run the repair.php script. Everything went fine. But unfortunately the 500 error message is still there.

As per your recommendation, I've looked in data/logs/error_log and here is what the error is.
PHP Fatal error:  require_once(): Failed opening required '/home/xxxxx/public_html/xxxxx/skins/jrxxxxx/include.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home/xxxxx/public_html/xxxxx/modules/jrCore/include.php on line 479

Note: The site was loading just fine after installing JR 6.1.1 and before importing the database backup.

Also I still have an unanswered question. As I have imported a JR 5.3 database backup to run with JR 6.1.1 files. I wonder if there will not be incompatibly? Is there any significant change between the database structure of JR 5.3 and JR 6.1.1? Will the repair.php script upgrade my database to the JR 6.1.1 version? (Sorry for my ignorance but I'have to ask).

Thanks
pch
@pch
09/25/17 07:30:35AM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

Hi Michael,

Thanks a lot for your reply.

You were right. I truncated the _blog_item table and I was able to proceed with the import.

Then I have started having the similar error for many other tables. Below are tables that were giving me the duplicate error message. So I had to truncate them all in order to complete the import of my JR 5.3 database backup into the JR 6.1.1 database:

 
TRUNCATE `jr_jraction_item`;
TRUNCATE `jr_jraction_item_key`;
TRUNCATE `jr_jrblog_item`;
TRUNCATE `jr_jrblog_item_key`;
TRUNCATE `jr_jrcore_cache`;
TRUNCATE `jr_jrcore_count_ip`;
TRUNCATE `jr_jrcore_form`;
TRUNCATE `jr_jrcore_form_session`;
TRUNCATE `jr_jrcore_log`;
TRUNCATE `jr_jrcore_log_debug`;
TRUNCATE `jr_jrcore_menu`;
TRUNCATE `jr_jrcore_modal`;
TRUNCATE `jr_jrcore_module`;
TRUNCATE `jr_jrcore_performance`;
TRUNCATE `jr_jrcore_play_key`;
TRUNCATE `jr_jrcore_setting`;
TRUNCATE `jr_jrfeed_item`;
TRUNCATE `jr_jrfeed_item_key`;
TRUNCATE `jr_jrmarket_channel`;
TRUNCATE `jr_jrmarket_system`;
TRUNCATE `jr_jrprofile_quota`;
TRUNCATE `jr_jrprofile_quota_setting`;
TRUNCATE `jr_jrprofile_quota_value`;
TRUNCATE `jr_jruser_language`;


After truncating the tables listed above in JR 6.1.1, I was able to successfully complete the import. Then I run the repair.php script. Everything went smoothly. The database repair, the system cache reset and the Integrity Check were complete.

After doing everything, I visited my site, unfortunately it doesn't load. I get a HTTP ERROR 500 message. The site was loading fine after installing JR 6.1.1 and before importing the database backup. I don't know what is wrong and how to fix it. Please help.

Also I had to truncate the jr_jrcore_setting table because it was giving me many errors such as:

#1062 - Duplicate entry 'jrCore-system_name' for key 'PRIMARY'
#1062 - Duplicate entry 'jrCore-default_cache_seconds' for key 'PRIMARY'
#1062 - Duplicate entry 'jrCore-allowed_domains' for key 'PRIMARY'
etc etc.

I don't know whether it was a good idea. I have truncated so many table in JR 6.1.1 in order to complete the database backup import that I am afraid of start having database issues in the future. I am very concerned. Was it right to truncate the jr_jrcore_setting table ? Also is there any significant change between the database structure of JR 5.3 and JR 6.1.1?

Thanks for helping.
pch
@pch
09/23/17 04:28:03PM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

@michael
@brian

Thanks for you help.

I've contacted my hosting provider and they have installed the iconv functions on my server. Thanks for the tip.

The cinstallation went smoothly.

Then I've moved to the next step to try to restore my site. I am trying to import my JR 5.3-based database backup into the JR 6.1.1 database using the import option of phpMyadmin but I am getting the following error :

Error
SQL Query:

INSERT INTO `jr_jrblog_item` (`_item_id`) VALUES
(1)

MySQL said:

#1062 - Duplicate entry '1' for key 'PRIMARY' 

What should I do?

Thanks
updated by @pch: 09/23/17 04:29:46PM
pch
@pch
09/22/17 07:01:48AM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

Thanks for your reply.

I will try the first option.

No, I don't have a custom module. I was referring to the JR modules (e.g. Paid modules: Audio and video support, Youtube, Item Tags etc). I will have them installed and set in the database (from the backup used), but what about their files on the server? Will they be created after running the repair.php script? Or maybe I have to re-install them from the marketplace in order to have their files on the server? If so, will my paid module settings remain in the database if i have to re-install them?

I have started running the installation of JR 6.1. I have entered my database name, username and password. When I run the install, I get this error message:

Fatal error: Call to undefined function iconv() in /home/xxxxxxx/public_html/subfolder/modules/jrCore/lib/util.php on line 2598

Do you have any idea on what is going on and how to fix it?

Also, I uploaded JR to a sub-folder. When I enter the /subfolder/install.php in the address bar after my site url, it redirects me to mysite.com/install.php (root) with the following error message: "Not Found. The requested URL /install.php was not found on this server."

The install page only displays if I copy and paste the full install url in the address bar of the browser like this:

www.mysite.com/subfolder/install.php

Why? Then, the address bar will start showing a "Not secure" message as if the server/page was not secure. (lack of https://)

Is this a normal JR behavior on installation? Please explain.

Thanks.
pch
@pch
09/21/17 08:53:11PM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

Hi Michael,

Thanks for your reply.

If I understand you well, I should try to install a clean JR 6.1 site, add the JR 5.3.xx database backup to that JR 6.1 site (by completely deleting the JR 6.1 database and restoring the JR 5.3.xx database backup via phpMyadmin), then run the repair.php script. Right ?

After this process, should I run the integrity check, then upgrade my database to JR 6.1? Or will the repair.php script upgrade my database without me loosing my system settings?

Is the JR 5.3 database structure same than the JR 6.1 structure?

The repair.php script you mentioned, should it be run by visiting myjrsite..com/repair.php , right?

What about the installed modules in my database backup, will their files be restored on the server by running the repair.php script? Or will the system tell me which modules are missing files and allow me to re-install them without loosing the module settings?

I am afraid, I don't want to loose my system, modules and templates settings and modifications contained in the database (SQL-format file). Please advise.

Many Thanks
pch
@pch
09/21/17 03:16:44PM
328 posts

How to restore a JR site with the Database backup file only?


Installation and Configuration

Hello Support Team and Friends,

I am in a very bad situation. I was working on my site few months ago and was making the backup. Then moved to another server.

Today when trying to restore the site on the new server, I've just realized that I've backed up the database only, not the site files.

So I only have a SQL-format dump file of the database (with all the system settings, quota etc) made on October 03, 2016. It is hours and hours of work (system configurations and settings). By then, my system was up to date. (Probably with JR 5.3.xx, i don't remember anymore)

Today, JR 6.1 is the latest release. My question is: "How to restore the JR site with the Database backup file only of JR 5.3.xx, then upgrade to JR 6.1?"

On my computer, I've an old jamroom-core-5.2.41 zip archive. Can I:

1) fully install it on the server,
2) restore my database using the JR 5.3.xx SQL-format dump file (overwriting the old 5.2.41 database),
3) then upgrade to 6.1 using the built-in JR system upgrade tool?

If so, what about the modules that were already installed in system before the backup was made? Will they be back in the system and work or should I have to re-reinstall them manually one by one?

Can someone help me with a comprehensive method and process to restore my site?

By the way, It is a new project and the site wasn't live yet. So it is empty. No audio, no video. (I just don't want to loose my system configurations/settings)

Thanks in advance.

Regards.

updated by @pch: 12/27/17 03:01:02PM
  5